GtkHeaderBar: Survive toggling custom / non-custom titles
authorMatthias Clasen <mclasen@redhat.com>
Wed, 20 Mar 2013 00:52:54 +0000 (20:52 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 20 Mar 2013 00:52:54 +0000 (20:52 -0400)
commitd42c2c3f19aebb976cf26303dbfb591bae2feae1
tree8987d9c055dd65eb1eb37f17e5636d83f64147e7
parent2648ba45c69b814ffe3fc54da88d516462ceb781
GtkHeaderBar: Survive toggling custom / non-custom titles

The code was always adding a label widget as a child, but
then skipping over it in forall if a custom_title was present.
This confuses internal logic of GTK+ which assumes that it
can iterate over the entire widget hierarchy with forall,
to maintain state. Fix this by destroying the label when
a custom_title is set, and recreating it as needed.
gtk/gtkheaderbar.c